p. 44
Particle World Description
This model features a population of spatially embodied agents moving through continuous space, each using a correlated walk. When agents collide, they become
confused, and each sets off in a new direction. We run each model simulation for
10,000 time steps and compare the number of collisions during that time.
Initialization
A population of 𝑁 agents is initialized with each agent placed at a random real-valued
locations on an 𝐿 × 𝐿 grid with periodic boundaries. Each agent 𝑖 has a direction heading θ𝑖, which is initially chosen at random from a uniform distribution of integers
[0, 359]. Each agent is fully defined by its location and directional heading. Other
model parameters are the whimsy, 𝑤, which determines the turning angle agents use
on each time step, and the speed, 𝑠, which determines the size of the step they take
when moving. Finally, we keep track of the cumulative number of collisions over time,
𝐶(𝑡).
Dynamics
At each time step, each agent, in a random order, turns, moves, and collides.
- An agent first turns by adding to its direction heading an integer value that is randomly drawn
from a uniform distribution in [0, 𝑤]. The agent then subtracts a newly drawn value
from the same distribution from its directional heading. In other words, its new directional heading is θ𝑖 +ɛ, where ɛ is randomly drawn from a binomial distribution
bounded in [−𝑤, 𝑤].
- The agent then moves 𝑠 units forward.
- If there are any other agents with a position within one unit of the focal agent’s new location (defined by the Euclidean distance between the centers of each agent), a collision occurs between the focal agent and all of these other nearby agents. In this case, all of the agents involved in the collision update their heading to a new value randomly selected from the uniform distribution [0, 359]. Each of the involved agents then moves forward 0.1 spatial
units in order to move away from the site of the collision and avoid cycles of perpetual collision. If a collision occurs, the cumulative collision counter 𝐶(𝑡) is incremented by one.